package com.yc.boot.common.model.response;

/**
 * 默认业务状态码
 *
 * @author 杨智杰
 */
public class DefaultStatus implements Result.Status {

    public static final Result.Status FAILURE = new DefaultStatus(-1, "操作失败!");
    public static final Result.Status SUCCESS = new DefaultStatus(200, "操作成功!");

    private int code;
    private String message;

    public DefaultStatus() {
    }

    public DefaultStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}